package com.jt.safe.ui.adpter

import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.jt.safe.R
import com.jt.safe.entity.DateBean

class TasksOfNursingPostItemAdapter :
    BaseQuickAdapter<DateBean, BaseViewHolder>(R.layout.tasks_of_nursing_post_item_item) {
    override fun convert(helper: BaseViewHolder, bean: DateBean) {
        val mDay = helper.getView<TextView>(R.id.day)
        mDay.text = bean.shownDay
        if (bean.isCheck) {
            mDay.setTextColor(mContext.resources.getColor(R.color.white))
            mDay.setBackgroundColor(mContext.resources.getColor(R.color.theme))
        } else {
            mDay.setTextColor(mContext.resources.getColor(R.color.black))
            mDay.setBackgroundColor(mContext.resources.getColor(R.color.white))
        }
    }
}